package cn.shadow.order.controller;

import cn.shadow.order.service.producer.Producer;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/product")
public class DemoMsgController {

    @Autowired
    private Producer producer;

    @PostMapping("/test")
    public String productMsg(String msg) {
        producer.producer(msg);
        return msg;
    }

    @PostMapping("/test2")
    public String productMsg2(String msg) {
        producer.producerB(msg);
        return msg;
    }

}
